function deleteThis(id) {
    $("#confirm").bind("click",function () {
        $.ajax({
            //请求方式
            type: "delete",
            //请求的媒体类型
            contentType: "application/json;charset=UTF-8",
            //请求地址
            url: "/blog/myBlog",
            data:JSON.stringify({articleId:id}),
            //数据，json字符串
            dataType: "json",
            async: true,
            //请求成功
            success: function (result) {
                if (result.code == 0){
                    let blog_id = "#blog_" + id;
                    showNotification("top", "提示", "删除成功,即将刷新。", "info");
                    setTimeout(function () {
                        window.location.href = "/blog/myBlog";
                    },2000)
                } else {
                    showNotification("top", "提示", "删除失败，权限不够！", "warning")
                }
            },
            //请求失败，包含具体的错误信息
            error: function (e) {
                showNotification("top", "提示", "请求失败！", "danger")
            }
        });
    })
}

function updateState(id) {
    $.ajax({
        //请求方式
        type: "POST",
        //请求地址
        url: "/blog/state?id=" + id,
        async: true,
        //请求成功
        success: function () {
            showNotification("top", "提示", "发布成功！", "info")
        },
        //请求失败，包含具体的错误信息
        error: function () {
            showNotification("top", "提示", "发布失败！", "danger")
        }
    });
}